<template>
  <div>
    <my-select v-model="selected1" :options="options1" />
    <my-select v-model="selected2" :options="options2" />
    <el-button @click="getValues">获取选中的值</el-button>
  </div>
</template>

<script>
import MySelect from "./components/MySelect.vue";

export default {
  components: { MySelect },
  data() {
    return {
      selected1: "",
      selected2: "",
      options1: [
        { label: "选项1", value: "1" },
        { label: "选项2", value: "2" },
      ],
      options2: [
        { label: "选项A", value: "A" },
        { label: "选项B", value: "B" },
      ],
    };
  },
  methods: {
    getValues() {
      console.log("选中值1:", this.selected1);
      console.log("选中值2:", this.selected2);
    },
  },
};
</script>
